package com.ghxxzx.dagl.vo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * desc:
 *
 * @author cx316
 * Created by cx316 on 2020-05-28.
 */
public class LxNode {
    private String id;
    private String text;
    private List<LxNode> nodes;
    private Integer parentId;
    private Map<String, Object> state = new HashMap<>();
    public LxNode(String id, String text) {
        this.id = id;
        this.text = text;
    }

    public LxNode(String id, String text, List<LxNode> nodes) {
        this.id = id;
        this.text = text;
        this.nodes = nodes;
    }

    public LxNode() {
    }
    public void initCheck(){
        state.put("checked",true);
    }
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }


    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public List<LxNode> getNodes() {
        if(nodes==null || nodes.size() == 0){
            return null;
        }
        return nodes;
    }

    public void setNodes(List<LxNode> nodes) {
        this.nodes = nodes;
    }
}
